<!DOCTYPE html>
<html lang="en">

<head>
  <title>进销存</title>
  <meta charset="utf-8" />
  <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, user-scalable=0">
  <meta name="theme-color" content="#000000" />
  <!-- <meta name="viewport" id="viewportMeta"> -->
  <meta name="description" content="Web site created using create-react-app" />
  <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
  <link rel="stylesheet" href="//g.alicdn.com/de/prismplayer/2.7.2/skins/default/aliplayer-min.css" />
  <!--  <script src="https://g.alicdn.com/de/prismplayer/2.7.2/aliplayer-min.js"></script>
  <script src="https://g.alicdn.com/de/prismplayer/2.7.2/aliplayer-h5-min.js"></script> -->



  <script src="https://as.alipayobjects.com/g/component/fastclick/1.0.6/fastclick.js"></script>
  <script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
  <script type="text/javascript"
    src="https://webapi.amap.com/maps?v=1.4.8&key=41ed2179e345522ddf39ba3a7fb88b7c"></script>
  <script>

    // var wechatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i);
    /* alert(wechatInfo[1]) */
    if ('addEventListener' in document) {
      document.addEventListener('DOMContentLoaded', function () {
        FastClick.attach(document.body);
      }, false);
    }
    if (!window.Promise) {
      document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"' + '>' + '<' + '/' + 'script>');
    }


    document.addEventListener('touchmove', function (ev) {
      ev.preventDefault();
    }, { passive: false });

    // var _hmt = _hmt || [];
    // (function () {
    //   var hm = document.createElement("script");
    //   hm.src = "https://hm.baidu.com/hm.js?e01ab9390ebefdd8bf4cd4e625ed344c";
    //   var s = document.getElementsByTagName("script")[0];
    //   s.parentNode.insertBefore(hm, s);
    // })();


    // function isIphoneX() {
    //   if (/iphone/gi.test(window.navigator.userAgent)) {
    //     /* iPhone X、iPhone XS */
    //     var x = (window.screen.width === 375 && window.screen.height === 812);
    //     /* iPhone XS Max */
    //     var xsMax = (window.screen.width === 414 && window.screen.height === 896);
    //     /* iPhone XR */
    //     var xR = (window.screen.width === 414 && window.screen.height === 896);
    //     if (x || xsMax || xR) {
    //       return true;
    //     } else {
    //       return false;
    //     }
    //   } else {
    //     return false
    //   }
    // }


    /* 函数使用 */

    // window.onload = function () {
    //   alert(isIphoneX())
    //   if (isIphoneX()) {
    //     // alert(history.length)
    //     if (history.length === 1) {
    //       console.log(document.querySelector('.tab-bar'))
    //       document.querySelector('.tab-bar').style.height = '70px'
    //     } else {
    //       document.querySelector('.tab-bar').style.height = '50px'
    //     }
    //   }
    // }






    // 微信支付2.0
    // function jsApiCall(data) {
    //   WeixinJSBridge.invoke(
    //     'getBrandWCPayRequest',
    //     {
    //       "appId": `${data.appId}`,
    //       "nonceStr": `${data.nonceStr}`,
    //       "package": `${data.package}`,
    //       "paySign": `${data.paySign}`,
    //       "signType": `${data.signType}`,
    //       "timeStamp": `${data.timeStamp}`
    //     },
    //     function (res) {
    //       if (res.err_msg === "get_brand_wcpay_request:ok") {
    //         if (data.type === 0) {
    //           window.location.href = data.link + '/paysuccess/' + data.orderno
    //         } else if (data.type === 1) {
    //           window.location.href = data.link + '/group/' + data.orderno
    //         }
    //       }
    //     }
    //   );
    // }

    // function callpay() {
    //   if (typeof WeixinJSBridge == "undefined") {
    //     if (document.addEventListener) {
    //       document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
    //     } else if (document.attachEvent) {
    //       document.attachEvent('WeixinJSBridgeReady', jsApiCall);
    //       document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
    //     }
    //   } else {
    //     jsApiCall(data);
    //   }
    // }

    // document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
    //   // 发送给好友
    //   WeixinJSBridge.on('menu:share:appmessage', function (argv) {
    //     shareFriend();
    //   });

    //   // 分享到朋友圈
    //   WeixinJSBridge.on('menu:share:timeline', function (argv) {
    //     shareTimeline();
    //   });
    //   // 分享到微博
    //   WeixinJSBridge.on('menu:share:weibo', function (argv) {
    //     shareWeibo();
    //   });
    // }, false)


    // function shareTimeline(data) {
    //   WeixinJSBridge.invoke('shareTimeline', {
    //     "img_url": data.url,
    //     "img_width": "200",
    //     "img_height": "200",
    //     "link": 'lineLink',
    //     "desc": descContent,
    //     "title": shareTitle
    //   }, function (res) {
    //     //_report('timeline', res.err_msg); // 这是回调函数，必须注释掉

    //   });
    // }




    window.onload = function () {
      console.log(document.querySelector('#root'))
      let height = document.documentElement.clientHeight
      window.innerHeight = height
      // document.querySelector('#root').style.height = document.documentElement.clientHeight + 'px'
      // alert(document.querySelector('#root').offsetHeight )
      // window.onresize = function () {
      //   alert(document.documentElement.clientHeight)
      //   alert(document.querySelector('#root').offsetHeight )
      // }
      // window.onresize = function () {
      //   let tab = document.querySelector('.tab-bar')
      //   tab.style.
      // }
    }


    // window.onload = function () {
    //   var initViewport = function (height) {
    //     var metaEl = document.querySelector("#viewportMeta");
    //     var content = "height=" + height + ",width=device-width,initial-scale=1.0,user-scalable=no";
    //     metaEl.setAttribute('name', 'viewport');
    //     metaEl.setAttribute('content', content);
    //   }
    //   var realHeight = window.innerWidth > window.innerHeight ? window.innerWidth : window.innerHeight
    //   initViewport(realHeight);
    // }




  </script>

</head>

<body>
  <noscript>You need to enable JavaScript to run this app.</noscript>
  <div id="root"></div>
</body>

</html>